<?php
namespace app\common\validate;

use think\Validate;

class Message extends Validate
{
    protected $rule = [
        'id'=>'require|gt:0|number',
        'content'=>'min:1|require|max:150',
        'page'  =>  'require|gt:0|number',
        'limit' =>  'require|gt:0|number',
        'captchaCode|验证码'=>'require|captcha',
        'nickName'=>'require|min:1|max:50',
        'token' =>'require|min:1|max:128'
    ];

    protected $scene = [
        'detail_list'  =>  ['page','limit'],
        'create'=>['content','captchaCode','nickName'],
        'delete'=>['id','token'],
        'list' => ['page','limit'],
        'backendList' => ['page','limit','token'],
    ];


}